home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form kbfrm
- BackColor = &H00C0C0C0&
- Caption = "Keyboard Status"
- ClientHeight = 1965
- ClientLeft = 1305
- ClientTop = 2775
- ClientWidth = 6135
- Height = 2370
- Left = 1245
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 1965
- ScaleWidth = 6135
- Top = 2430
- Width = 6255
- Begin CheckBox ClrChk
- BackColor = &H00C0C0C0&
- Caption = "Switch ON Color"
- Height = 210
- Left = 2070
- TabIndex = 6
- Top = 1485
- Width = 1710
- End
- Begin Timer Timer2
- Interval = 10000
- Left = 330
- Top = 750
- End
- Begin Timer Timer1
- Interval = 100
- Left = 360
- Top = 120
- End
- Begin Label led
- BorderStyle = 1 'Fixed Single
- Height = 255
- Index = 4
- Left = 4170
- TabIndex = 5
- Top = 1080
- Width = 615
- End
- Begin Label led
- BorderStyle = 1 'Fixed Single
- Height = 255
- Index = 3
- Left = 3150
- TabIndex = 4
- Top = 1080
- Width = 615
- End
- Begin Label led
- BorderStyle = 1 'Fixed Single
- Height = 255
- Index = 2
- Left = 2265
- TabIndex = 3
- Top = 1080
- Width = 615
- End
- Begin Label led
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Small Fonts"
- FontSize = 6.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Index = 1
- Left = 1290
- TabIndex = 2
- Top = 1080
- Width = 615
- End
- Begin Label Label
- BackColor = &H00C0C0C0&
- Caption = " CAPS NUMS SCROLL INSERT"
- Height = 225
- Left = 1140
- TabIndex = 1
- Top = 795
- Width = 3870
- End
- Begin Label Title
- BorderStyle = 1 'Fixed Single
- Caption = " As you play with the KB Locks, WGLib functions on a VB timer will update the pseudo LEDs."
- Height = 405
- Left = 960
- TabIndex = 0
- Top = 225
- Width = 4215
- End
- DefInt A-Z
- Const OnClr = &HFF&
- Const OffClr = &H80&
- Const OnClr1 = &HFF00&
- Const OffClr1 = &H8000&
- Sub Form_Load ()
- Call Timer1_timer
- End Sub
- Sub Form_Paint ()
- ConvexFrm KBFrm, 5
- ConcaveCtl Title, 5
- For x = 1 To 4
- ConcaveCtl Led(x), 4
- Next x
- End Sub
- Sub Form_Unload (Cancel As Integer)
- MsgBox "This is from VB code using our WGLib functions and is NOT our KBStat Control!", 16, "By the way..."
- End Sub
- Sub led_Click (Index As Integer)
- Timer2.Enabled = 0
- Select Case Index
- Case 1
- If KeyLockC() Then
- Call KBCapsOff
- Else
- Call KBCapsOn
- End If
- Case 2
- If KeyLockN() Then
- Call KBNumsOff
- Else
- Call KBNumsOn
- End If
- Case 3
- If KeyLockS() Then
- Call KBScrlOff
- Else
- Call KBScrlOn
- End If
- Case 4
- If KeyLockI() Then
- Call KBInsOff
- Else
- Call KBInsOn
- End If
- End Select
- Call Timer1_timer
- End Sub
- Sub Timer1_timer ()
- If ClrChk.value Then
- UseOnClr& = OnClr
- UseOfClr& = OffClr
- Else
- UseOnClr& = OnClr1
- UseOfClr& = OffClr1
- End If
- For x = 1 To 4
- Select Case x
- Case 1
- Stat = KeyLockC()
- Case 2
- Stat = KeyLockN()
- Case 3
- Stat = KeyLockS()
- Case 4
- Stat = KeyLockI()
- End Select
- GoSub SetLed
- Next x
- Exit Sub
- SetLed:
- If Stat Then
- Led(x).BackColor = UseOnClr&
- Else
- Led(x).BackColor = UseOfClr&
- End If
- Return
- End Sub
- Sub Timer2_Timer ()
- t& = Led(1).BackColor
- Led(1).BackColor = &HFFFFFF
- Led(1).FontSize = 6.75
- Led(1).Caption = "Click Me"
- Led(1).Refresh
- Beep
- s = Second(Now)
- s = s + 2
- If s > 60 Then s = s - 60
- Do Until (Second(Now) >= s)
- 'j = DoEvents()
- Loop
- Led(1).BackColor = t&
- Led(1).Caption = ""
- Led(1).Refresh
- End Sub
-